﻿using System.ComponentModel.DataAnnotations;

namespace XsqTech.SmartOA.Domain.Table
{
    /// <summary>
    /// 用户实体模型
    /// </summary>
    public class User:Audit
    {
        [Key]
        public Guid Id { get; set; }
        /// <summary>
        /// 用户名称
        /// </summary>
        [StringLength(50)]
        [Required]//特性注解
        public string UserName { get; set; }
        /// <summary>
        /// 用户密码
        /// </summary>
        [StringLength(100)]
        [Required]
        public string UserPassword { get; set; }
        /// <summary>
        /// 用户手机
        /// </summary>
        [Required]
        [StringLength(20)]
        public string UserPhone { get; set; }
        /// <summary>
        /// 头像
        /// </summary>
        public string? HeadPortrait { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        [Required,StringLength(50)]
        public string UserMailbox { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        [Required,StringLength(10)]
        public string UserSex { get; set; }
        /// <summary>
        /// 年龄
        /// </summary>
        public int UserAge { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [Required]
        public int State { get; set; } //1是禁用，0是启用
        public Guid BranchId { get; set; } //一个用户有多个部门，一对多关系
        public int DeleteId { get; set; } = 0;
    }
}